﻿using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Linq;
using BUS;
using DTO;
using System.Collections.Generic;
using System.Text;

namespace TDTVService
{
    /// <summary>
    /// Summary description for NganhNgheService
    /// </summary>
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    [ToolboxItem(false)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment the following line. 
    // [System.Web.Script.Services.ScriptService]
    public class NganhNgheService : System.Web.Services.WebService
    {

        [WebMethod]
        public List<DTO.LINHVUC> DanhSachCacLinhVucService()
        {
            return BUS.NganhNghe_BUS.DanhSachCacLinhVucService();
            
        }
        [WebMethod]
        public List<NGANHNGHE> LayNganhNgheTheoCongViec(string Mcv)
        {
            try
            {
                return BUS.NganhNghe_BUS.LayNganhNgheTheoCongViec(Mcv);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        [WebMethod]
        public List<NGANHNGHE> DanhSachCacNganhNgheService() {
            return BUS.NganhNghe_BUS.DanhSachCacNganhNgheService();
        }
        [WebMethod]
        public List<DTO.NganhNgheDTO> DanhSachCacNganhNgheTheoLinhVucService(string MaLinhVuc)
        {
            return BUS.NganhNghe_BUS.DanhSachCacNganhNgheTheoLinhVucService(MaLinhVuc);
        }
        [WebMethod]
        public void CapNhatNganhNgheCuaCongViec(CONGVIEC_NGANHNGHE congviec, string MaNganhNgheCu)
        {
            BUS.NganhNghe_BUS.CapNhatNganhNgheCuaCongViec(congviec, MaNganhNgheCu);
        }
        [WebMethod]
        public void HuyNganhNgheCuaCongViec(CONGVIEC_NGANHNGHE congviec)
        {
            BUS.NganhNghe_BUS.HuyNganhNgheCuaCongViec(congviec);
        }
        [WebMethod]
        public void ThemCongViec_NganhNghe(CONGVIEC_NGANHNGHE congviec)
        {
            BUS.NganhNghe_BUS.ThemCongViec_NganhNghe(congviec);
        }
    }
}
